<template>
    <van-nav-bar title="个人中心" left-text="返回" right-text="退出" left-arrow @click-left="onClickLeft"
        @click-right="onClickRight" />
    <van-cell-group title="个人中心">
        <van-cell title="地址管理" is-link arrow-direction="right" @click="address" />
        <van-cell title="订单中心" is-link arrow-direction="right" @click="order" />
    </van-cell-group>
</template>

<script setup lang="ts">
    import { useRouter } from 'vue-router';
    let router = useRouter()
    const onClickLeft =()=>{
        router.push("/home")
    }
    const onClickRight = ()=>{
        localStorage.removeItem("token")
        router.push("/home")
    }
    const address =()=>{
        router.push("/address")
    }
    const order =()=>{
        router.push("/order")
    }
</script>

<style scoped>
h4 {
    margin-right: 100px;
    font-size: 20px;
}
</style>